#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
#include<string.h>
int is_move(char str[], char str1[])
{
	assert(str != NULL);
	assert(str1 != NULL);
	size_t a = strlen(str);
	size_t a1 = strlen(str1);
	if (a != a1)
	{
		return 0;
	}
	strncat(str, str1,a);
	char *ret=strstr(str, str1);
	if (ret != NULL)
	{
		return 1;
	}
	return 0;
}
int main()
{
	char arr[10] = "ABCD";
	char arr1[10] = "BCDA";
	int ret = is_move(arr, arr1);
	if (ret == 1)
	{
		printf("yes\n");
	}
	else
	{
		printf("no\n");
	}
	return 0;
}